<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/static/css/opp.css"/>
    <script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#title").click(function () {
                $("#top").toggle(600);
                $("#result_show").toggleClass("full_result");
            })
            $("#commit").click(function () {
                $("#top").hide(500);
                $("#result_show").css({bottom:"54px",top:"0"});
                $.post("/show_log/{{ hostname }}",$("#form").serialize(),function (result) {
                    $("#result_show").html(result);
                });
            });
        });

    </script>
</head>
<body>
<div id="title">LogShow: {{hostname}}-{{ip}}</div>


<div id="top">
    <form id="form" action="/logout/{{hostname}}" method="POST">
        <table>
        <tr><td>LogType:</td><td>
            <select name="logtype" id="logtype">
            <option value="access">access</option>
            <option value="error">error</option>
            </select></td></tr>
        <tr><td>DateTime:</td><td><input name="datetime" id="datetime" type="text" value={{ today }}></td></tr>
        <tr><td>ShowNum:</td><td><input name="shownum" id="shownum" type="text" value="20"></td></tr>
        </table>
        <p><button id="commit" type="button">Commit</button></p>
    </form></div>
<div id="result_show">

</div>

</body>
</html>